package com.wangcanxuan.www.po;

import com.wangcanxuan.www.annotation.orm.Column;
import com.wangcanxuan.www.annotation.orm.PrimaryKey;
import com.wangcanxuan.www.annotation.orm.Table;

import java.sql.Timestamp;

/**
 * 通知实体类与数据库notice表一一映射
 *
 * @author HHLJ
 * @date 2022/03/15
 */
@Table(tableName = "notice")
public class Notice {
    @PrimaryKey
    @Column(columnName = "id",description = "主键")
    private Integer id;

    @Column(columnName = "content",description = "通知内容")
    private String content;

    @Column(columnName = "create_time",description = "创建时间")
    private Timestamp createTime;

    @Column(columnName = "user_id",description = "被通知者（用户表id）")
    private Integer userId;

    public Notice() {
    }

    public Notice(Integer id, String content, Timestamp createTime, Integer userId) {
        this.id = id;
        this.content = content;
        this.createTime = createTime;
        this.userId = userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Notice{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", userId=" + userId +
                '}';
    }
}
